#include "mc_utility.h"
#include <algorithm>

float mc_utility::gen_random()
{
    float s = 0;
    for (unsigned int j = 0; j < 12; ++j)
    {
        s += (float)(rand())/RAND_MAX-0.5;
    }
    return s; 
}

unsigned int mc_utility::gen_uniform_random(unsigned int low, unsigned int high)
{
    return rand() / (RAND_MAX + 1.0) * (high - low) + low;
    return rand() % (high - low) + 1;
}